package main

import (
	"fmt"
	"time"
)

func init() {

}

func main() {

	fmt.Println(time.Now().Format("2006-01-02 15:04:05"))
	fmt.Println(time.Now())
	fmt.Println(time.Now().Unix() - time.Now().Unix()%3600)
	fmt.Println(time.Now().Unix() - time.Now().Unix()%600)

	timeNowMinute := time.Now().Unix() - time.Now().Unix()%60
	fmt.Println(timeNowMinute)
	fmt.Println(time.Unix(timeNowMinute, 0).Format("2006-01-02 15:04:05"))

	timeNow := time.Now().Unix() - time.Now().Unix()%int64(3600)
	timeNow = timeNow - timeNow%int64(3600)
	fmt.Println(time.Unix(time.Now().Unix(), 0).Format("2006-01-02 15:04:05"))
	fmt.Println(time.Unix(timeNow, 0).Format("2006-01-02 15:04:05"))

	fmt.Println(time.Now().Format("20060102150405"))
}
